# encoding: utf-8

from openpyxl import Workbook

# 新建工作簿
wb = Workbook()
# 新建sheet
sheet = wb.active
sheet.title = '贫困认定结果'

# 特别困难
very_difficult = "丁乙贵；兰剑鹏； 杨康； 罗海洋； 郭黎康； 杨苗； 邓月 ；朱梦圆 ；田金城 ；李思敏； 祁霞 ；岳语成； 的日石布 ；沙晓琼 ；廖世敏 ；唐欢"
# 困难
difficult = '覃洪杰；任永坤；张学坤 ；胡峻山；罗媛媛；李浩鑫；石桂林'
# 一般困难
just_difficult = '陈茜；何述涵；朱光屿；唐果； 蒋竞程；刘军；齐豪'

# 去空格
very_difficult_replace = very_difficult.replace(" ", "")
difficult_replace = difficult.replace(" ", "")
just_difficult_replace = just_difficult.replace(" ", "")

# 分割字符串
very_difficult_split = very_difficult_replace.split('；')
difficult_split = difficult_replace.split('；')
just_difficult_split = just_difficult_replace.split('；')

# 新建单元格，并写入内容-行列
for item in very_difficult_split:
    sheet.append([item,'特别困难'])

for item in difficult_split:
    sheet.append([item,'困难'])

for item in just_difficult_split:
    sheet.append([item,'一般困难'])

# 保存
wb.save('output/贫困认定结果.xlsx')